// PropertiesOfProductFormat.h: interface for the PropertiesOfProductFormat class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PROPERTIESOFPRODUCTFORMAT_H__9C459DA7_40F2_49B2_8646_8D265F25AE5B__INCLUDED_)
#define AFX_PROPERTIESOFPRODUCTFORMAT_H__9C459DA7_40F2_49B2_8646_8D265F25AE5B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <afxtempl.h>
#include "ProductFormatProperty.h"
#include "TextException.h"

namespace JointSystem
{
class PartFormat;
class PropertiesOfProductFormat  
{
	friend class PropertiesOfProduct;
	friend class PartFormatManager;

public:
	PropertiesOfProductFormat();
	virtual ~PropertiesOfProductFormat();

public:
	ProductFormatProperty* Get( const CString& propname ) const throw ( TextException ) {
		ProductFormatProperty* ptr = 0;
		if ( m_Props.Lookup( propname, (void*&)ptr ) == FALSE ) 
			throw TextException( _T( "Exceptional property" ), _T( "Maybe undefined" ) );
		return ptr; }

private:
	void SetAt( const CString& propname, ProductFormatProperty* pp ) { 
		m_Props.SetAt( propname, pp ); }
	const CMapStringToPtr& Properties() const { return m_Props; }

private:
	CMapStringToPtr m_Props;
};

};

#endif // !defined(AFX_PROPERTIESOFPRODUCTFORMAT_H__9C459DA7_40F2_49B2_8646_8D265F25AE5B__INCLUDED_)
